<?php 
$tmp_where=$v;
$tmp_where['31583X27X766']=''+$tmp_where['31583X27X765'];
unset($tmp_where['31583X27X765']);
$rs_cnt2=$Qa_Survey->getList($tmp_where,null,null,array('sum(case when 31583X24X495=1 then 1 else 0 end) as cnt'));
unset($tmp_where['31583X27X766']);
$rs_cnt3=$Qa_Survey->getList(array(),null,null,array('sum(case when 31583X24X495=1 then 1 else 0 end) as cnt'));
echo '<pre>';print_r($rs);print_r($rs_cnt2);print_r($rs_cnt3); echo $array_sum($rs,'rule_id_129_2');exit;
return $v['rule_id_129_2']*100.0/$array_sum($rs,'rule_id_129_2') + $rs_cnt2[0]['cnt']*100/$rs_cnt3[0]['cnt'];
 ?>